package org.balthie.demo.jdk.util.set;

import java.util.BitSet;

public class BitSetDemo {

	public static void main(String[] args) {

//		初始化一个有 一亿个 bit槽的bitset，  底层是 long[]只能按 64的倍数扩容
		int bitSlotCount = 100_000_000;
//		
		BitSet bs = new BitSet(bitSlotCount);
		System.out.println(bs.size());
//		System.out.println(ClassLayout.parseInstance(bs).toPrintable());
		
		for(int i=10_000_000; i<20_000_000;i++)
		{
			bs.set(i);
		}
		
		System.out.println(bs.get(19_000_000));
	}
}
